import React, { useEffect, useRef } from 'react'

export default(props)=>{
  const c1 = useRef(null)
  var option={}
  useEffect(()=>{
  var myChart = echarts.init(c1.current)
  console.log(props.data,'888888')
  if(props.data){
    option=props.data
    myChart.setOption(option);
  }
  },[props])
return <div ref={c1} style={{height:'600px',marginTop:'50px'}}></div>
}
